<template>
  <view>
    <u-popup :show="show" @close="close" mode="bottom" round="20rpx">
      <view class="popup-main">
        <view class="popup-list">
          <view class="popup-nav" v-for="item,index in iconList" :key="index" >
            <view class="popup-icon" @click.stop="onchange(item)">
              <image :src="item.img" mode=""></image>
              <view class="popup-title">{{item.title}}</view>
            </view>
          </view>
        </view>
        <view class="popup-close" @click="close">取消</view>
      </view>
    </u-popup>
  </view>
</template>

<script>
  export default {
    props: ['show'],
    data() {
      return {
        iconList: [{
          img: "../../static/icon/specialcolumnPage/Topping.png",
          title: "置顶",
          type:'1'
        }, {
          img: "../../static/icon/specialcolumnPage/OffShelf.png",
          title: "内容下架",
          type:'2'
        }, {
          img: "../../static/icon/specialcolumnPage/display.png",
          title: "取消隐藏",
          type:'3'
        }, {
          img: "../../static/icon/specialcolumnPage/delete.png",
          title: "删除",
          type:'4'
        }, {
          img: "../../static/icon/specialcolumnPage/CancelTopping.png",
          title: "取消置顶",
          type:'5'
        }, {
          img: "../../static/icon/specialcolumnPage/open.png",
          title: "内容公开",
          type:'6'
        }, {
          img: "../../static/icon/specialcolumnPage/hide.png",
          title: "隐藏",
          type:'7'
        }, {
          img: "../../static/icon/specialcolumnPage/refund.png",
          title: "一键退款",
          type:'8'
        }]
      }
    },
    methods: {
      close() {
        this.$emit('closeShow',false)
      },
      onchange(item){
        this.$emit('popupChange',item)
      }
    }
  }
</script>

<style lang="less" scoped>
  .popup-main {
    box-sizing: border-box;
    padding: 52rpx 42rpx 20rpx;
    background-color: #fff;

    .popup-list {
      height: 478rpx;
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      .popup-nav{
        width: 25%;
        height: 210rpx;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .popup-icon {
        width: 108rpx;
        display: flex;
        flex-direction: column;
        align-items: center;

        image {
          height: 108rpx;
          width: 108rpx;
        }

        .popup-title {
          font-size: 28rpx;
          font-weight: 400;
          color: #313131;
          margin-top: 20rpx;
        }
      }
    }

    .popup-close {
      height: 122rpx;
      width: 100%;
      border-top: 4rpx solid #E6E6E6;
      font-size: 36rpx;
      font-weight: 500;
      line-height: 122rpx;
      text-align: center;
      color: #313131;
    }
  }
</style>